home *** CD-ROM | disk | FTP | other *** search
Text File | 1995-10-14 | 6.7 KB | 224 lines | [TEXT/MPCC] |
- /*
- * Filename: Flex.g
- * Author: Jeff Laing (jeffl@suburbia.apana.org.au)
- *
- * This files defines a simple push-button interface onto the essentially
- * command-line driven lexical analyser generator "Flex 2.5.1". It requires
- * the GIJO compiler, also available from Tristero and hopefully included in
- * this package.
- *
- * Copyright (C) 1995 Tristero Computer Systems Pty. Ltd. ___//|
- * ACN 067 057 809 O \\|
- *
- * The following flags do not have a corresponding GIJO interface.
- *
- * -T trace mode
- * -S skeleton file
- * -H header skeleton
- * -h [headername]
- * -g header pathname in output file
- * -t standard output, not file
- * -a tempdir
- */
- filetype {'TEXT'}
-
- gijo {{
- 160, /* height of the dialog in pixels */
- "Process input parser description and produce a lexical "
- "analyzer which may be included into C / C++ programs.",
- {
-
- /*****************************************************************************/
-
- /*1*/ notDependent{},TextBox{ gray, { 24,18,116,170 }, "Parser" },
-
- /*2*/ notDependent{},
- CheckOption{
- NotSet, {30, 24, 46, 168}, "Case-insensitive", "-i",
- "Generate scanner which is case-insensitive. The case of letters "
- "in input patterns will be ignored and tokens in the input will "
- "be matched, regardless of case."
- },
-
- /*3*/ Or{{
- (1<<12)+24, // -Cem
- (2<<12)+24, // -Cm
- (3<<12)+24, // -Ce
- (4<<12)+24 // -C
- }},
- CheckOption{
- NotSet, {50, 24, 66, 168}, "Interactive", "-I",
- "Generate an scanner which stops immediately rather than looking "
- "ahead if it knows that currently scanned text cannot be part of "
- "a longer rule's match."
- // -B (interactive=FALSE)
- },
-
- /*4*/ notDependent{},
- CheckOption{
- NotSet, {70, 24, 86, 168}, "8-bit clean", "-8",
- "Generate a scanner which can handle 8-bit characters. The "
- "alternative is one which only handles 7-bit input."
- // -7
- },
-
- /*5*/ notDependent{},
- CheckOption{
- Set, {90, 24, 106, 168}, "Default ECHO rule", "-s",
- "Automatically include a rule which will match any unmatched "
- "input and will echo it to stdout."
- },
-
- /*****************************************************************************/
-
- /*6*/ notDependent{},TextBox{ gray, { 24,180,116,316 }, "Code" },
-
- /*7*/ notDependent{},
- CheckOption{
- NotSet, {30,186,46,310}, "Debug", "-d",
- "Generate debugging code within the scanner which will write "
- "debugging info to stderr if global 'yy_flex_debug' is true."
- },
-
- /*8*/ notDependent{},
- CheckOption{
- NotSet, {46,186,62,310}, "C++", "-+",
- "Generate a C++ scanner."
- },
-
- /*9*/ notDependent{},
- CheckOption{
- NotSet, {62,186,78,310}, "Lex compatible", "-l",
- "Generate a parser which is compatible with AT&T Lex output."
- },
-
- /*10*/ notDependent{},
- CheckOption{
- Set, {78,186,94,310}, "#line directives", "-L",
- "Include #line directives in its output. This is only useful if "
- "the C compiler used recognises this construct."
- },
-
- /*11*/ notDependent{},
- CheckOption{
- NotSet, {94, 186, 110, 310}, "Use read()", "-R",
- "Use read() instead of standard I/O. (No guarantee that this "
- "will work on Macintosh.)"
- },
-
- /*****************************************************************************/
-
- /*12*/ notDependent{}, TextBox{ gray, { 124,18,152,464 }, "Output" },
-
- /*13*/ notDependent{},
- CheckOption{
- NotSet, {130, 24, 146, 169}, "Suppress warnings", "-w",
- "Suppress warnings during parsing the input file."
- },
-
- /*14*/ notDependent{},
- CheckOption{
- NotSet, {130, 170, 146, 258}, "Backtrack", "-b",
- "Generate a list of scanner states which require backtracking "
- "to the file 'lex.backtrack'. By adding rules, these can be "
- "eliminated and scanner performance improved."
- },
-
- /*15*/ notDependent{},
- CheckOption{
- NotSet, {130, 260, 146, 368}, "Performance", "-p",
- "Generate a performance report to stderr."
- },
-
- /*16*/ notDependent{},
- CheckOption{
- NotSet, {130, 370, 146, 460}, "Statistics", "-v",
- "Generate a summary of statistics regarding the generated scanner"
- },
-
- /*****************************************************************************/
-
- /*17*/ notDependent{},
- RegularEntry{
- "Name:", {64, 330, 80, 379}, {64, 380, 80, 460 },
- "yy", keepCase, "-P≈",
- "Flex uses this to determine the name of the scanner, both the "
- "disk file and the C functions (if appropriate). If ≈ is specified, "
- "flex will use 'lex.≈.c' and '≈' respectively."
- },
-
- /*****************************************************************************/
-
- /*18*/ notDependent{}, NestedDialog{
- 1,
- {95,330,116,464},
- "Table format…",
- "Display controls for specifying compression and alignment to be "
- "applied to parser tables."
- },
-
- /*****************************************************************************/
-
- /*19*/ Or{{17}}, // we can only hit DoIt if a -Pname is specified
- DoItButton{},
-
- /*20*/ notDependent{}, // Credit where credit is due
- VersionDialog{
- VersionString{"2.5.1"},
- "Flex 2.5.1 by Vern Paxson\n\n"
- "Macintosh interface by Jeff Laing <jeffl@suburbia.apana.org.au>",
- 0
- },
-
- /*21*/ notDependent{},Icon {128,{ 24, 330, 24+32, 330+32 }},
- /*22*/ notDependent{},TextTitle{ 0, {20,380,58,464}, 0, 24,"Flex"}
- }
-
- /*****************************************************************************/
-
- },{
- 124, /* height of the dialog in pixels */
- "This window allows the user to change the characteristics "
- "of the generated parser tables.", /* help string */
- {
- /*23*/ notDependent{},Box{ black, { 24,18,100,462 } /* , "Table format" */ },
-
- /*24*/ notDependent{},
- RadioButtons{{
- {30,24,46,264},"Equivalence & Meta-equivalence","-Cem",Set,
- "Generate both equivalence and meta-equivalence tables. "
- "This option should result in the slowest + smallest scanner",
-
- {30,270,46,456},"Meta-equivalence","-Cm",NotSet,
- "Generate meta-equivalence tables. Slight performance overhead",
-
- {46,24,62,264},"Equivalence","-Ce",NotSet,
- "Generate equivalence tables. Can give dramatic reductions "
- "in final table/object file sizes",
-
- {46,270,62,456},"Compressed","-C",NotSet,
- "Compress scanner tables but do not generate equivalence "
- "or meta-equivalence tables",
-
- {62,24,78,264},"Equivalence, no compression","-Cfe",NotSet,
- "Generate equivalence tables without compression",
-
- {62,270,78,456},"Equivalence, fast format","-CFe",NotSet,
- "Generate equivalence tables and use fast scanner "
- "representation.",
-
- {78,24,94,264},"No compression","-Cf",NotSet,
- "Generate full scanner tables without compression",
-
- {78,270,94,456},"Fast format","-CF",NotSet,
- "Use fast scanner representation on uncompressed tables"
- }},
-
- /*25*/ notDependent{},
- CheckOption{
- NotSet, {104, 24, 120, 195}, "Longword alignment", "-A",
- "Align tables to longword boundary. Sacrifice memory usage "
- "for execution speed."
- }
- }
- }}